<?php 
include('inc/includes.php'); ?>
<meta charset="utf-8">
<br>
<div align="center" style="width:500px" id='cadForm'>
<?php if($this->session->flashdata('respcli') != "" ){ ?>
        <div class='alert alert-success'><?=$this->session->flashdata('respcli')?></div>  
    <?}?>  
    <form id="cadFrm" method="POST" action="<?=base_url()?>cliente/edita" />
        <input type="hidden" id="tipo" name="tipo" value="<?=$tipo?>" />
        <input type="hidden" id="reg" name="reg" value="<?=$nregistro?>" />
        <div class="input-group">
            <span class="input-group-addon">CPF | CNPJ </span>
            <input type="text" name="nregistro" id="nregistro" disabled='disabled' style="width:100%" class="form-control" value="<?=@$nregistro?>" />
        </div>
        <br>
        <div class="input-group">
            <span class="input-group-addon">Nome | Razão Social</span>
            <input type="text" id="nome" name="nome" style="width:100%" class="form-control" placeholder="" value="<?=@$nome?>" />
        </div>
        <br>
        <div class="input-group">
            <span class="input-group-addon">Telefone</span>
            <input type="text" id="telfixo" name="telfixo" style="width:100%" class="form-control" placeholder="(99)9999-99999" value="<?=@$telfixo?>" />
        </div>
        <br>  
        <div class="input-group">
            <span class="input-group-addon">Celular</span>
            <input type="text" id="telmovel" name="telmovel" style="width:100%" class="form-control" placeholder="(99)9999-99999" value="<?=@$telmovel?>" />
        </div>
        <br>
        <div class="input-group">
            <span class="input-group-addon">Email</span>
            <input type="text" id="email" name="email" style="width:100%" class="form-control" placeholder="email@dominio.com" value="<?=@$email?>" />
        </div>
        <br>
        <div class="input-group">
            <span class="input-group-addon">Rua</span>
            <input type="text" name="endereco" style="width:100%" class="form-control" placeholder="" value="<?=@$endereco?>" />
        </div>
        <br>
        <div class="input-group">
            <span class="input-group-addon">Bairro</span>
            <input type="text" name="bairro" style="width:100%" class="form-control" placeholder="" value="<?=@$bairro?>" />
        </div>
        <br>
        <div class="input-group">
            <span class="input-group-addon">Cidade</span>
            <input type="text" name="cidade" style="width:100%" class="form-control" placeholder="" value="<?=@$cidade?>" />
        </div>
        <br>
        <div class="input-group">
            <span class="input-group-addon">Estado</span>
            <input type="text" name="estado" style="width:100%" class="form-control" placeholder="" value="<?=@$estado?>" />
        </div>
        <br>
        <div class="input-group">
            <span class="input-group-addon">Cep</span>
            <input type="text" id="cep" name="cep" style="width:100%" class="form-control" placeholder="99.999-999" value="<?=@$cep?>" />
        </div>   
        <? if($tipo != 'f'){?>
        <br> 
        <div id="representante">
            <div class="input-group">
                <span class="input-group-addon">Nome do Rep. Legal</span>
                <input type="text" name="nome_rep" style="width:100%" class="form-control" placeholder="" value="<?=@$nome_rep?>">
            </div> 
            <br>
            <div class="input-group">
                <span class="input-group-addon">RG</span>
                <input type="text" id="rgrep" name="rg" style="width:100%" class="form-control" placeholder="99999999 99" value="<?=@$rg?>" />
            </div> 
            <br>
            <div class="input-group">
                <span class="input-group-addon">CPF</span>
                <input type="text" id="cpfrep" name="cpf" style="width:100%" class="form-control" placeholder="999.999.999-99" value="<?=@$cpf?>" />
            </div> 
            <br>
            <div class="input-group">
                <span class="input-group-addon">Orgão Expeditor</span>
                <input type="text" name="expeditor" style="width:100%" class="form-control" placeholder="" value="<?=@$expeditor?>">
            </div> 
            <br>
            <div class="input-group">
                <span class="input-group-addon">Endereço</span>
                <input type="text" name="endereco_rep" style="width:100%" class="form-control" placeholder="" value="<?=@$endereco_rep?>">
            </div> 
            <br>
            <div class="input-group">
                <span class="input-group-addon">Telefone Fixo</span>
                <input type="text" id="telfixo_rep" name="telfixo_rep" style="width:100%" class="form-control" placeholder="(99)9999-99999" value="<?=@$telfixo_rep?>">
            </div> 
            <br>
            <div class="input-group">
                <span class="input-group-addon">Celular</span>
                <input type="text" id="telmovel_rep" name="telmovel_rep" style="width:100%" class="form-control" placeholder="(99)9999-99999" value="<?=@$telmovel_rep?>">
            </div>
        <?}?>
        <br>
        </div> 
        <input id="formSalva" name="cad" type="submit" value="Salva" class="btn btn-primary" role="button">
        <input id="formCancela" name="cancela" type="button" value="Cancela" class="btn btn-primary" role="button">
    </form>
</div>